﻿@using Smartstore.Web.Models.Catalog;

@model ProductSummaryModel

@{
    var isGrid = Model.ViewMode == ProductSummaryViewMode.Grid;
    var title = isGrid ? T("Products.SwitchToList") : T("Products.SwitchToGrid");
    var url = isGrid ? Display.ModifyUrl(null, "v=list") : Display.ModifyUrl(null, "v=grid");
    var icon = isGrid ? "list" : "th";
}

<div class="artlist-action artlist-action--viewmode">
    @* < lg *@
    <a href='@url' class="btn btn-light btn-artlist-action tooltip-toggle d-lg-none" data-toggle="tooltip" rel="nofollow" title="@title">
        <i class="fa fa-@icon"></i>
    </a>
    @* >= lg *@
    <a href='@url' class="btn btn-secondary btn-artlist-action tooltip-toggle d-none d-lg-inline-block" data-toggle="tooltip" rel="nofollow" title="@title">
        <i class="fa fa-@icon"></i>
    </a>
</div>